{{include file="public/header.php"/>}}
<style type="text/css">
	.tabs-wrapper .nav .active{
		background: #E9E9E9;
	}
</style>
<ol class="breadcrumb">
	<li>
		<span class="glyphicon glyphicon-home"></span>
		<a href="{{U('Cms/Index/welcome')}}">首页</a>
	</li>
	<li>素材管理</li>
</ol>
<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<div class="alert alert-success" style="border:solid 1px #27ae60;">
				<strong>注意!</strong>
				随意修改菜单将影响后台功能<br/>
				随意修改菜单将影响后台功能
			</div>
		</div>
	</div>

<!-- 素材管理 -->
<div class="row">
	<div class="col-lg-12">
		<div class="main-box clearfix">
			<div class="row">
				<div class="tabs-wrapper">
					<div class="form-group col-xs-12">
					<ul class="nav">
						<li style="margin-left:5px;" class="<?php if (!$w) {echo 'active';} ?>"><a href="{{U('Wx/Library/index')}}">文字消息</a></li>
						<li class="<?php if ($w == 1) {echo 'active';} ?>"><a href="{{U('Wx/Library/index',array('w'=>1))}}">图文消息</a></li>
						<li class="<?php if ($w == 2) {echo 'active';} ?>"><a href="{{U('Wx/Library/index',array('w'=>2))}}">图片库</a></li>
					</ul>
						
					</div>
					<div class="tab-content">
						<div class="tab-pane fade active in" >
							<div class="form-group col-xs-3">
								<div class="input-group ">
										<a href="{{U('Wx/Library/index')}}">文字消息</a> / 新建文字消息
								</div>
							</div>
							<div class="form-group col-xs-6">
								<form action="" onsubmit="return ajax_submit();">
									<div class="table-responsive">
										<div class="form-group">
											<label class="control-label">内容</label>
											<textarea rows="5" class="form-control" name="content" id=""></textarea>
										</div>
										<div class="form-group">
											<input type="submit" class="btn btn-primary" value="保存">
											<input type="reset" class="btn" value="清除">
										</div>
									</div><!-- table-responsive -->
								</form>
							</div><!-- form-group col-xs-12 -->
						</div>
						<div class="tab-pane fade" id="wordimg">
							<input name="img" value="" type="file">
						</div>
						<div class="tab-pane fade" id="img">
							<input onchange="return set_hidden(this,2);" checked='checked' value="" type="text" class="form-control">
						</div>
					</div><!-- tab-content -->
				</div><!-- tabs-wrapper -->
			</div><!-- row -->
		</div><!-- main-box clearfix -->
	</div><!-- col-lg-12 -->
</div><!-- row -->

<!-- 素材管理 -->

</div>

{{include file="public/footer.php"/}}
<script type="text/javascript">
	function ajax_submit()
	{
		$.ajax(
		{
			url: "{{U('Wx/Library/store')}}",
			type: 'POST',
			dataType: 'JSON',
			data: {'content':$("textarea").val()},
			success:function(data)
			{
				dialog(data.content, 'success', 1000, function () {
				    if(data.status)
					{
					    $("textarea").val('');
					}
				});
			}
		})
		return false;
	}
</script>
